/*
 * @lc app=leetcode.cn id=706 lang=cpp
 *
 * [706] 设计哈希映射
 */

// @lc code=start
class MyHashMap {
    map<int,int> m;
public:
    MyHashMap() {

    }
    
    void put(int key, int value) {
        m[key] = value;
    }
    
    int get(int key) {
        auto it = m.find(key);
        if(it != m.end())
        {
            return it->second;
        }
        return -1;
    }
    
    void remove(int key) {
        auto it = m.find(key);
        if(it != m.end())
        {
            m.erase(it);
        }
    }
};

/**
 * Your MyHashMap object will be instantiated and called as such:
 * MyHashMap* obj = new MyHashMap();
 * obj->put(key,value);
 * int param_2 = obj->get(key);
 * obj->remove(key);
 */
// @lc code=end

